from django.db import models
from django.contrib.auth.models import AbstractUser


class UserProfile(AbstractUser):
    nick_name = models.CharField(max_length=16, verbose_name=u"昵称", default=u'用户名称')
    gender = models.CharField(choices=(('male', u'男'), ('female', u'女')), default=u'female', max_length=6,
                              verbose_name=u"性别")
    weixin = models.CharField(max_length=100, default=u"", verbose_name=u"微信")
    mobile = models.CharField(max_length=11, verbose_name=u'手机', null=True)
    image = models.ImageField(upload_to='image/%Y/%m', default=u"image/default.png", max_length=100, verbose_name=u"头像")
    
    class Meta:
        verbose_name = u'用户信息'
        verbose_name_plural = verbose_name
    
    def __unicode__(self):
        return self.username

